package cn.always.xiajia.framework.common.config;

import javax.validation.constraints.NotEmpty;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.validation.annotation.Validated;

import lombok.Data;

@ConfigurationProperties(prefix = "xj.rpc")
@Validated
@Data
public class RpcProperties {

	/**
	 * 防止外部访问FeignClient
	 */
	@NotEmpty(message = "rpc Header 不能为空")
	private String rpcHeader = "xjrpc";

	/**
	 * HTTP 请求时，访问令牌的请求 Header
	 */
	@NotEmpty(message = "rpc Header Secret不能为空")
	private String rpcHeaderSecret = "20d7a5f0-c475-4ce9-997e-bd3787bdee41";

	/**
	 * rpc URL prefix列表
	 */
	@NotEmpty(message = "rpc URL prefix不能为空")
	private String rpcurlprefix = "rpc-api";

}
